import request from '@/utils/request'
import { transFormValue, transformData } from '@/utils/tools'
import qs from 'qs'


//评估对象列表
export function targetGetList(data) {
  return request({
    url: '/target/getList' + transFormValue(data),
    method: 'post'
  })
}

//创建评估对象
export function targetCreate(data) {
    return request({
      url: '/target/create',
      method: 'post',
      data: qs.stringify(data)
    })
}

//更新评估对象
export function targetUpdate(data) {
    return request({
      url: '/target/update',
      method: 'post',
      data: qs.stringify(data)
    })
}


//评估对象详情
export function targetInfo(data) {
    return request({
      url: '/target/info' + transFormValue(data),
      method: 'post'
    })
}

//导入
export function targetImportZip(data){
    return request({
        url: '/target/importZip'+ transFormValue(data),
        method: 'post'
    })
}

//评估对象集合
export function targetGetCollection(data) {
  return request({
    url: '/target/getCollection' + transFormValue(data),
    method: 'post'
  })
}

//批量评估对象
export function targetDelete(data) {
  return request({
    url: '/target/delete' + transFormValue(data),
    method: 'post'
  })
}

//对象导出
export function targetExport(data) {
  return request({
    url: '/target/export' + transFormValue(data),
    method: 'post'
  })
}

//获取都出可选字段
export function targetGetExportFieldOptions(data){
  return request({
    url: '/target/getExportFieldOptions' + transFormValue(data),
    method: 'post'
  })
}


